// 上传文件 参数 id 文件id file文件,上传人 上传人id
const { sequelize, DataTypes } = require('sequelize');
const { ISFORCE } = require("../utils/dot");

const { Op } = require('sequelize');
const seq = require("../db/index");
const uploadFile = seq.define('uploadFile', {
    fileURL: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: "文件路径"
    },
    fileName: {
        type: DataTypes.STRING,
        comment: "文件名"
    },
    uploader: {
        type: DataTypes.STRING,
        comment: "上传人"
    },
    uploaderId: {
        type: DataTypes.INTEGER,
        comment: "上传人id"
    }
}, {});

if (ISFORCE == "true") {
    uploadFile.sync({ force: true });
}

module.exports = uploadFile;